<?php


namespace App\Http\Controllers\Admin;


use App\Http\Controllers\Controller;
use App\Services\Admin\CategoryService;
use Illuminate\Http\Request;

class CategoryController extends Controller
{
    private $categoryService;

    public function __construct(Request $request, CategoryService $categoryService)
    {
        $this->request = $request;
        $this->categoryService = $categoryService;
    }

    public function getCategoryInfo(Request $request)
    {
        $params = $request->post();
        $result = $this->categoryService->getCategoryInfo($params);
        return $result;
    }

    public function getChildrenInfo(Request $request)
    {
        $params = $request->post();
        $result = $this->categoryService->getChildrenInfo($params);
        return $result;
    }

    public function getCategoryProduct(Request $request)
    {
        $params = $request->post();
        $result = $this->categoryService->getCategoryProduct($params);
        return $result;
    }


}
